const { env } = require("../../package.json")
const commonDefs = {
    ContractedDefineList: [{ "id": 1, "name": "已签甲方" }, { "id": 2, "name": "已签已方" }, { "id": 0, "name": "未签" }],
    ContractedDefineObj: { 1: "已签甲方", 2: "已签已方", 0: "未签" },
    AppProviderLevelList: [{ "id": 1, "name": "A1" }, { "id": 2, "name": "A2" }, { "id": 3, "name": "A3" }, { "id": 4, "name": "B1" }, { "id": 5, "name": "B2" }, { "id": 6, "name": "B3" }],
    AppProviderLevelObj: { 1: "A1", 2: "A2", 3: "A3", 4: "B1", 5: "B2", 6: "B3" },
    versionCodeList: [{ "id": -1, "name": "全部系统版本" }, { "id": 1, "name": '1.0' }, { "id": 2, "name": '1.1' }, { "id": 3, "name": '1.5' }, { "id": 4, "name": '1.6' }, { "id": 5, "name": '2.0' }, { "id": 6, "name": '2.0.1' }, { "id": 7, "name": '2.1' }, { "id": 8, "name": '2.2.x' }, { "id": 9, "name": '2.3-2.3.2' }, { "id": 10, "name": '2.3.3-2.3.7' }, { "id": 11, "name": '3.0' }, { "id": 12, "name": '3.1' }, { "id": 13, "name": '3.2.x' }, { "id": 14, "name": '4.0.1-4.0.2' }, { "id": 15, "name": '4.0.3-4.0.4' }, { "id": 16, "name": '4.1.x' }, { "id": 17, "name": '4.2.x' }, { "id": 18, "name": '4.3.x' }, { "id": 19, "name": '4.4-4.4.4' }, { "id": 20, "name": '4.4W' }, { "id": 21, "name": '5.0' }, { "id": 22, "name": '5.1' }, { "id": 23, "name": '6.0' }, { "id": 24, "name": '7.0' }, { "id": 25, "name": '7.1-7.1.1' }, { "id": 26, "name": '8.0' }, { "id": 27, "name": '8.1' }, { "id": 28, "name": '9' }, { "id": 29, "name": "10" }, { "id": 30, "name": "11" }],
    versionList: [{ "Id": 1, "Name": '1.0' }, { "Id": 2, "Name": '1.1' }, { "Id": 3, "Name": '1.5' }, { "Id": 4, "Name": '1.6' }, { "Id": 5, "Name": '2.0' }, { "Id": 6, "Name": '2.0.1' }, { "Id": 7, "Name": '2.1' }, { "Id": 8, "Name": '2.2.x' }, { "Id": 9, "Name": '2.3-2.3.2' }, { "Id": 10, "Name": '2.3.3-2.3.7' }, { "Id": 11, "Name": '3.0' }, { "Id": 12, "Name": '3.1' }, { "Id": 13, "Name": '3.2.x' }, { "Id": 14, "Name": '4.0.1-4.0.2' }, { "Id": 15, "Name": '4.0.3-4.0.4' }, { "Id": 16, "Name": '4.1.x' }, { "Id": 17, "Name": '4.2.x' }, { "Id": 18, "Name": '4.3.x' }, { "Id": 19, "Name": '4.4-4.4.4' }, { "Id": 20, "Name": '4.4W' }, { "Id": 21, "Name": '5.0' }, { "Id": 22, "Name": '5.1' }, { "Id": 23, "Name": '6.0' }, { "Id": 24, "Name": '7.0' }, { "Id": 25, "Name": '7.1-7.1.1' }, { "Id": 26, "Name": '8.0' }, { "Id": 27, "Name": '8.1' }, { "Id": 28, "Name": '9' }, { "Id": 29, "Name": "10" }, { "Id": 30, "Name": "11" }],

    getContractedName(id) {
        if (this.ContractedDefineObj.hasOwnProperty(id)) {
            return this.ContractedDefineObj[id];
        }
        return "";
    },
    getAppProviderLevelName(id) {
        if (this.AppProviderLevelObj.hasOwnProperty(id)) {
            return this.AppProviderLevelObj[id]
        }
        return "";
    },
    getVersionName(versionCode) {
        let name = "";
        let cnt = this.versionCodeList.length;
        for (let i = 0; i < cnt; i++) {
            let item = this.versionCodeList[i];
            if (item.id == versionCode) {
                return item.name;
                break;
            }
        }
        return name;
    },
}
export default commonDefs